<template>
  <div id="detail" style="padding: 30px">
    <span style="font-weight: bold;">{{ helpDoc.title }}</span>
    <el-divider content-position="left"></el-divider>
    <div class="content" v-html="helpDoc.content"></div>
  </div>
</template>

<script>
import Api from "@/api/";

export default {
  name: "Detail",
  data() {
    return {
      helpDoc: {}
    }
  },
  mounted() {
    let id = this.$route.params.id;

    Api.helpDoc.detail({
      targetId: id,
    }).then((res) => {
      this.helpDoc = {
        ...res.data,
        content: decodeURIComponent(res.data.content),
      }
      Api.helpDoc.view({targetId: id})
    });
  }
}
</script>

<style lang="scss" scoped>
.content {
  margin-left: 3px;
  font-size: 14px;
  line-height: 130%;
}
</style>
